package cn.dansj.repository;

import cn.dansj.entity.InterfaceGroup;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface InterfaceGroupRepository extends JpaRepository<InterfaceGroup, String> {
    @Query(value = "select distinct t.inGroup from InterfaceGroup t where t.inGroup is not null and t.inGroup<>''")
    List<String> getGround();

    @Modifying
    void deleteAllByInterfaceSequence(String sequence);
}
